/**
 * 
 */
package it.unical.canonaco.rende.igpe.game.cbv.guilayer.sprites.key;

/**
 * @author Massimo Canonaco
 *
 */
public abstract class AbstractFrameKey 
{
	abstract public String getKey();
	abstract public AbstractFrameKey getCopy();
	
	@Override
	public int hashCode() 
	{
		return this.getKey().hashCode();
	}
	
	@Override
	public boolean equals(Object o)
	{
		if(o instanceof AbstractFrameKey)
		{
			AbstractFrameKey sfki = (AbstractFrameKey) o;
			System.out.println(this.getKey().equals(sfki.getKey()+ "derivato da "+this.getKey()+" e "+sfki.getKey()));
			return this.getKey().equals(sfki.getKey());
		}
		
		return super.equals(o);
	}
}
